module MC.View {
    export class Order {
        public constructor() {
            this.init();
        }
        private init(){
            MC.apiD('lunbotu',{
            genre:MC.DEL.AdModel.genre_H5_order
            },(obj:any)=>{
                this.loadPic(obj);
            });
        }
         private swiper:any=null;
        private  loadPic(list:any){
             if(this.swiper){
                this.swiper.destroy();
            }
             $('#homePpt .swiper-container .swiper-wrapper').html('');
            for (let i = 0; i < list.length; i++) {
                let one = list[i];
                let html = `<div class="swiper-slide">
                  <a href="` + one.link + `" class="line">
                      <img class="pic" src="` + one.img + `"/>
                  </a>
              </div>`;
                $('#homePpt .swiper-container .swiper-wrapper').append(html);
            }
            this.swiper = new Swiper('.swiper-container', {
                pagination: {
                    el: '.swiper-pagination',
                },
            });
        }
    }
}